home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / GRAHAM / XAAES_S.ZIP / XAAES / TESTAPP / TEST_AES.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-06  |  3.5 KB  |  210 lines

  1. #include "TEST_AES.H"
  2. #include "../KERNAL.H"
  3. #include "../K_DEFS.H"
  4.  
  5. AESPB pb;
  6. short intin[300];
  7. short intout[300];
  8. void *addrin[300];
  9. void *addrout[300];
  10.  
  11. short Pappl_init[]={10,0,1,0,0};
  12. short Pappl_exit[]={19,0,1,0,0};
  13. short Pevnt_button[]={21,3,5,0,0};
  14. short Pevnt_mesag[]={23,0,1,1,0};
  15. short Pgraf_handle[]={77,0,5,0,0};
  16. short Pgraf_mouse[]={78,1,1,1,0};
  17. short Pgraf_mkstate[]={79,0,5,0,0};
  18. short Pwind_create[]={100,5,1,0,0};
  19. short Pwind_open[]={101,5,1,0,0};
  20. short Pwind_close[]={102,1,1,0,0};
  21. short Pwind_set[]={105,6,1,0,0};
  22.  
  23. short Tappl_init(void)
  24. {
  25.     pb.contrl=Pappl_init;
  26.     pb.intin=intin;
  27.     pb.intout=intout;
  28.     pb.addrin=addrin;
  29.     pb.addrout=addrout;
  30.     
  31.     call_aes(AESCMD_STD,&pb);
  32.     
  33.     return intout[0];
  34. }
  35.  
  36. short Tappl_exit(void)
  37. {
  38.     pb.contrl=Pappl_exit;
  39.     pb.intin=intin;
  40.     pb.intout=intout;
  41.     pb.addrin=addrin;
  42.     pb.addrout=addrout;
  43.     
  44.     call_aes(AESCMD_STD,&pb);
  45.     
  46.     return intout[0];
  47. }
  48.  
  49. short Twind_create(short kind,short x, short y, short w, short h)
  50. {
  51.     pb.contrl=Pwind_create;
  52.     pb.intin=intin;
  53.     pb.intout=intout;
  54.     pb.addrin=addrin;
  55.     pb.addrout=addrout;
  56.     
  57.     intin[0]=kind;
  58.     intin[1]=x;
  59.     intin[2]=y;
  60.     intin[3]=w;
  61.     intin[4]=h;
  62.  
  63.     call_aes(AESCMD_STD,&pb);
  64.     
  65.     return intout[0];
  66. }
  67.  
  68. short Twind_set(short handle, short request, short x, short y, short w, short h)
  69. {
  70.     pb.contrl=Pwind_set;
  71.     pb.intin=intin;
  72.     pb.intout=intout;
  73.     pb.addrin=addrin;
  74.     pb.addrout=addrout;
  75.     
  76.     intin[0]=handle;
  77.     intin[1]=request;
  78.     intin[2]=x;
  79.     intin[3]=y;
  80.     intin[4]=w;
  81.     intin[5]=h;
  82.  
  83.     call_aes(AESCMD_STD,&pb);
  84.     
  85.     return intout[0];
  86. }
  87.  
  88. short Twind_open(short handle,short x, short y, short w, short h)
  89. {
  90.     pb.contrl=Pwind_open;
  91.     pb.intin=intin;
  92.     pb.intout=intout;
  93.     pb.addrin=addrin;
  94.     pb.addrout=addrout;
  95.     
  96.     intin[0]=handle;
  97.     intin[1]=x;
  98.     intin[2]=y;
  99.     intin[3]=w;
  100.     intin[4]=h;
  101.     
  102.     call_aes(AESCMD_STD,&pb);
  103.     
  104.     return intout[0];
  105. }
  106.  
  107. short Twind_close(short handle)
  108. {
  109.     pb.contrl=Pwind_close;
  110.     pb.intin=intin;
  111.     pb.intout=intout;
  112.     pb.addrin=addrin;
  113.     pb.addrout=addrout;
  114.     
  115.     intin[0]=handle;
  116.     
  117.     call_aes(AESCMD_STD,&pb);
  118.     
  119.     return intout[0];
  120. }
  121.  
  122. short Tevnt_button(short mc, short mask, short state, short *x, short *y, short *button, short *kstate)
  123. {
  124.     pb.contrl=Pevnt_button;
  125.     pb.intin=intin;
  126.     pb.intout=intout;
  127.     pb.addrin=addrin;
  128.     pb.addrout=addrout;
  129.     
  130.     intin[0]=mc;
  131.     intin[1]=mask;
  132.     intin[2]=state;
  133.     
  134.     call_aes(AESCMD_STD,&pb);
  135.     
  136.     *x=intout[1];
  137.     *y=intout[2];
  138.     *button=intout[3];
  139.     *kstate=intout[4];
  140.     
  141.     return intout[0];
  142. }
  143.  
  144. short Tevnt_mesag(short *msg)
  145. {
  146.     pb.contrl=Pevnt_mesag;
  147.     pb.intin=intin;
  148.     pb.intout=intout;
  149.     pb.addrin=addrin;
  150.     pb.addrout=addrout;
  151.     
  152.     addrin[0]=msg;
  153.     
  154.     call_aes(AESCMD_STD,&pb);
  155.     
  156.     return intout[0];
  157. }
  158.  
  159. short Tgraf_mouse(short number, void *addr)
  160. {
  161.     pb.contrl=Pgraf_mouse;
  162.     pb.intin=intin;
  163.     pb.intout=intout;
  164.     pb.addrin=addrin;
  165.     pb.addrout=addrout;
  166.     
  167.     intin[0]=number;
  168.     addrin[0]=addr;
  169.     
  170.     call_aes(AESCMD_STD,&pb);
  171.     
  172.     return intout[0];
  173. }
  174.  
  175. short Tgraf_handle(short *wchar, short *hchar, short *wbox, short *hbox)
  176. {
  177.     pb.contrl=Pgraf_handle;
  178.     pb.intin=intin;
  179.     pb.intout=intout;
  180.     pb.addrin=addrin;
  181.     pb.addrout=addrout;
  182.     
  183.     call_aes(AESCMD_STD,&pb);
  184.     
  185.     *wchar=intout[1];
  186.     *hchar=intout[2];
  187.     *wbox=intout[3];
  188.     *hbox=intout[4];
  189.  
  190.     return intout[0];
  191. }
  192.  
  193. short Tgraf_mkstate(short *x, short *y, short *button, short *kstate)
  194. {
  195.     pb.contrl=Pgraf_mkstate;
  196.     pb.intin=intin;
  197.     pb.intout=intout;
  198.     pb.addrin=addrin;
  199.     pb.addrout=addrout;
  200.     
  201.     call_aes(AESCMD_STD,&pb);
  202.  
  203.     *x=intout[1];
  204.     *y=intout[2];
  205.     *button=intout[3];
  206.     *kstate=intout[4];
  207.     
  208.     return intout[0];
  209. }
  210.